package com.lzy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 操作日志实体类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("operate_log")
public class OperateLog {
    
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    
    @ApiModelProperty(value = "操作类型：1-新增，2-修改，3-删除")
    private Integer operateType;
    
    @ApiModelProperty(value = "操作表：1-学生，2-教师")
    private Integer targetType;
    
    @ApiModelProperty(value = "操作对象ID")
    private Integer targetId;
    
    @ApiModelProperty(value = "操作对象名称")
    private String targetName;
    
    @ApiModelProperty(value = "学号/教师编号")
    private String targetNum;
    
    @ApiModelProperty(value = "操作内容")
    private String content;
    
    @ApiModelProperty(value = "操作时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
} 